package cookinmaddy.database.spod;

/**
 * ...
 * @author Yog
 */

 
import cookinmaddy.model.RecipeIngredient;
import php.Lib;
 
class DBRecipeIngredient extends php.db.Object
{
	public var value : RecipeIngredient ;
	
	public var rec_id : Int;
	public var ing_id : Int;
	public var uni_id : Int;
	public var quantity : Float;
	static var TABLE_NAME = "recipe_ingredients";
	static var TABLE_IDS = ["rec_id", "ing_id", "uni_id" ];
	static var PRIVATE_FIELDS = ["value"];
	
	public static var DROP_REQUEST = "drop table " + TABLE_NAME + ";";
	public static var CREATION_REQUEST_V1 = "create table " + TABLE_NAME + " " +
	"( " +
		"rec_id integer not null," +
		"ing_id integer not null," +
		"uni_id varchar(15) not null ," +
		"quantity float not null" +
	");";
	
	public static var manager = new DBRecipeIngredientManager();
}